package com.zs.toolbox.web2j.common.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * Created by liujie on 2017/3/20.
 */
@Data
@ApiModel
public class WtPageQueryModel {

    @ApiModelProperty(value = "请求的每页的数据条数", example = "10")
    protected Long rows;//分页大小
    @ApiModelProperty(value = "分页号", example = "1")
    protected Long page;//页数

    public Long getRows() {
        if (rows == null || rows > 50L) {
            return 300L;
        }
        return rows;
    }

    public Long getPage() {
        if (page == null) {
            return 1L;
        }
        return page;
    }

}
